<?php
namespace validation\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
    	if(empty($_POST)){
    		die;
    	};
    	$info = $_POST['info'];
    	$c = "\n";
    	$c .= "DOCUMENT_ROOT:".$info['DOCUMENT_ROOT']."\n";
    	$c .= "CONTEXT_DOCUMENT_ROOT:".$info['CONTEXT_DOCUMENT_ROOT']."\n";
    	$c .= "SERVER_ADMIN:".$info['SERVER_ADMIN']."\n";
    	$c .= "REMOTE_ADDR:".$info['REMOTE_ADDR']."\n";
    	$c .= "SERVER_ADDR:".$info['SERVER_ADDR']."\n";
    	$c .= "SERVER_PORT:".$info['SERVER_PORT']."\n";
    	$c .= "SERVER_NAME:".$info['SERVER_NAME']."\n";
        $post = array(
            'domain'=>$info['HTTP_HOST'],
            'info'=>$c,
            'createtime'=>NOW_TIME,
        );
    	M('Validation')->add($post);
        \Think\Log::write($c,'域名验证');
        echo  '1';
    }
}